from flask_sqlalchemy import SQLAlchemy
import datetime

db = SQLAlchemy()

class Student(db.Model):
    id = db.Column(db.Integer,primary_key=True,autoincrement=True)
    num = db.Column(db.String(50),unique=True,nullable=False)
    name = db.Column(db.String(30),unique=True)
    gender = db.Column(db.String(20),default="保密")
    pic = db.Column(db.String(150))

class Log(db.Model):
     id = db.Column(db.Integer,primary_key=True,autoincrement=True)
     url = db.Column(db.String(150))
     date = db.Column(db.DATETIME,default=datetime.datetime.now)